package com.probox.activity.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.annotation.Excel;
import com.probox.common.core.enums.PrizeTypeEnum;
import com.probox.common.core.enums.ReceivedEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(description="中奖明细")
public class LotteryPrizeVo implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long prizeUid;
    /** 平台ID */
    @Excel(name = "平台ID")
    @ApiModelProperty(value = "平台ID(平台ID)")
    private Long platformUid;

    /** 用户ID */
    @Excel(name = "用户ID")
    @ApiModelProperty(value = "用户ID(用户ID)")
    private Long customerUid;

    /** 用户名 */
    @Excel(name = "用户名")
    @ApiModelProperty(value = "用户名(用户名)")
    private String customerName;

    /** 用户头像 */
    @Excel(name = "用户头像")
    @ApiModelProperty(value = "用户头像(用户头像)")
    private String customerUrl;

    /** 活动ID */
    @Excel(name = "活动ID")
    @ApiModelProperty(value = "活动ID(活动ID)")
    private Long lotteryUid;

    /** 抽奖活动标题 */
    @Excel(name = "抽奖活动标题")
    @ApiModelProperty(value = "抽奖活动标题(抽奖活动标题)")
    private String lotteryTitle;

    /** 中奖的奖品ID */
    @Excel(name = "中奖的奖品ID")
    @ApiModelProperty(value = "中奖的奖品ID(中奖的奖品ID)")
    private Long prizePuid;

    /** 奖品类型 */
    @Excel(name = "奖品类型")
    @ApiModelProperty(value = "奖品类型(奖品类型)")
    private String prizeType;

    /** 奖品名称 */
    @Excel(name = "奖品名称")
    @ApiModelProperty(value = "奖品名称(奖品名称)")
    private String prizeName;

    /** 奖品ICON */
    @Excel(name = "奖品ICON")
    @ApiModelProperty(value = "奖品ICON(奖品ICON)")
    private String prizeIcon;

    /** 中奖的个数 */
    @Excel(name = "中奖的个数")
    @ApiModelProperty(value = "中奖的个数(中奖的个数)")
    private Long prizeAmoung;

    /** 中奖时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "中奖时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "中奖时间(中奖时间)")
    private Date createTime;

    /** 用户收货地址ID */
    @Excel(name = "用户收货地址ID")
    @ApiModelProperty(value = "用户收货地址ID(用户收货地址ID)")
    private Long userAddressid;

    /** 状态 0 未领取 1 已领取 */
    @Excel(name = "状态 0 未领取 1 已领取")
    @ApiModelProperty(value = "状态 0 未领取 1 已领取 ")
    private String status;

    /** 订单ID */
    @Excel(name = "订单ID")
    @ApiModelProperty(value = "订单ID(订单ID)")
    private Long orderUid;

    /** 商品ID */
    @Excel(name = "商品ID")
    @ApiModelProperty(value = "商品ID(商品ID)")
    private Long proUid;

    /** 商品名称 */
    @Excel(name = "商品名称")
    @ApiModelProperty(value = "商品名称(商品名称)")
    private String proName;

    /** 商品图片 */
    @Excel(name = "商品图片")
    @ApiModelProperty(value = "商品图片(商品图片)")
    private String proImg;

    /**
     * 商品编码
     */
    private String proNo;
    /**
     * 商品单位
     */
    private String proUnit;

    @ApiModelProperty(value = "零售价")
    private BigDecimal retailPrice;

    private String platSource;
    private String payMethod;

    public String getPrizeTypeStr(){
        return PrizeTypeEnum.getNameByKey(prizeType);
    }

    public String getStatusStr(){
        return ReceivedEnum.getNameByKey(status);
    }

}
